Skip to content

Conversation

ronjalh
Copy link
Member

@ronjalh ronjalh commented Nov 10, 2026

What

Splits src/tests/pages/ElementsPage.test.tsx (1375 lines) by topic, as asked in the peer feedback (#167).

File Tests
ElementsPage.test.tsx the page
ElementsPage.filters.test.tsx apparatus, group and difficulty
ElementsPage.filtersAddress.test.tsx the filters and the address, the structure, clearing
ElementsPage.sort.test.tsx the sort
ElementsPage.combined.test.tsx search, filters and sort together
ElementsPage.results.test.tsx the results from the API
ElementsPage.search.test.tsx the search
ElementsPage.loadMore.test.tsx Load more

The shared set-up (the stub server, renderPage, the menu helpers) is in src/tests/elementsPage.tsx.

Checked

  • The code was moved by a script and not rewritten: 64 tests before and 64 after, all passing.
  • tsc, ESLint and Prettier are clean. The README names the new files.
  • The helper file has one eslint-disable for react-refresh/only-export-components, because it exports both components and functions and is not part of the app.

Closes #181

🤖 Generated with Claude Code

The 1375-line file becomes eight files of at most 260 lines (the page, the
filters, the filters and the address, the sort, the combined cases, the
results, the search and Load more), with the shared set-up in
src/tests/elementsPage.tsx. No test is changed: 64 tests before and after.

Closes #181
@ronjalh ronjalh requested a review from a team as a code owner November 10, 2026 19:35
@ronjalh ronjalh self-assigned this Nov 10, 2026
Base automatically changed from dev to main November 10, 2026 19:45
@ronjalh ronjalh changed the base branch from main to dev November 10, 2026 19:49
Copy link
Member

@xeniag xeniag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants